function[out]=circle(d,ang,r,x);
% d the diameter
% ang the angle
% r the radius vector
%
y=x;
[X,Y]=meshgrid(x,y);
xp=r*cosd(ang);
yp=r*sind(ang);
rad=d/2;
out=(X-xp).^2+(Y-yp).^2<=rad^2;
end